require 'rexml/document'


class Masters

	attr_accessor :stateID
	attr_accessor :mergeID
	attr_accessor :pseudoID
	attr_accessor :connectorID

	def initialize( xml_doc )

		xml_doc.elements.each { | element |
			if "State/ Region" == element.attributes["NameU"]
				@stateID = element.attributes["ID"]
			elsif "Dynamic connector" == element.attributes["NameU"]
				@connectorID = element.attributes["ID"]
			elsif "Decision/ Merge" == element.attributes["NameU"]
				@mergeID = element.attributes["ID"]
			elsif "Pseudostate" == element.attributes["NameU"]
				@pseudoID = element.attributes["ID"]
			end
		}

	end

end
